package de.mizi.tilemap.tile;

import de.mizi.tilemap.object.TilemapObjectDrawData;
import de.mizi.tilemap.object.TilemapObject;

/**
 * A tile on a tilemap.
 * @author mizi
 *
 */
public class Tile extends TilemapObject {
	protected boolean isBlocking;
	
	/**
	 * Constructs a new Tile object with the given data.
	 * @param drawData the data that is necessary to draw this Tile object
	 * @param description the description of this tile
	 * @param isBlocking true if you can not move onto this tile, false otherwise
	 */
	public Tile(TilemapObjectDrawData drawData, String description, boolean isBlocking) {
		super(drawData, description);
		this.isBlocking = isBlocking;
	}

	/**
	 * Returns true if you can not move onto this tile.
	 * @return true if you can not move onto this tile, false otherwise
	 */
	public boolean isBlocking() {
		return isBlocking;
	}

	/**
	 * Set to true if you can not move onto this tile or false otherwise.
	 * @param isBlocking true if you can not move onto this tile, false otherwise
	 */
	public void setBlocking(boolean isBlocking) {
		this.isBlocking = isBlocking;
	}
}
